<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="UTF-8">
		<title>用户列表</title>
		<!--导入框架样式文件-->
		<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}" />
		<script type="text/javascript" th:src="@{/js/jquery1.12.4.min.js}"></script>
		<script type="text/javascript" th:src="@{/js/bootstrap.min.js}"></script>
		<style>

		</style>
	</head>

	<body>
	<div class="container-fluid">
			<div class="panel panel-default">
				<div class="panel-heading clearfix">
					<a th:href="@{/user/toAdd}"  class="btn btn-primary pull-right" >添加用户</a>
				</div>
			</div>

			<table class="table table-bordered table-hover ">
				<tr>
					<th>编号</th>
					<th>用户名</th>
					<th>密码</th>
					<th>真实姓名</th>
					<th>邮箱</th>
					<th>电话</th>
					<th>操作</th>
				</tr>
				<tr  th:each="user,userState:${users}">
					<td><span th:text="${user.uid}"/></td>
					<td><span th:text="${user.username}"/></td>
					<td><span th:text="${user.password}"/></td>
					<td><span th:text="${user.realname}"/></td>
					<td><span th:text="${user.email}"/></td>
					<td><span th:text="${user.telephone}"/></td>
					<td>
					  <a class="btn btn-success btn-sm" href="" th:href="@{/user/toUpdate(uid=${user.uid})}">修改</a>&nbsp;
					  <a class="btn btn-danger btn-sm" href="" th:href="@{/user/delete(uid=${user.uid})} " onclick="return confirm('确认删除吗？')">删除</a>
					</td>
				</tr>
			</table>
		</div>
	</div>
</body>

</html>